<template>
	<view>
		<view class="rule-box">
			<image class="rule-img" mode="widthFix" @click="isShowRule = true" :src="imagePath + 'rule-icon.png'">
			</image>
			<image class="rule-img" mode="widthFix" @click="telMobile" :src="imagePath + 'tel-icon.png'"></image>
			<image class="rule-img" mode="widthFix" @click="gotoQuanyi" :src="imagePath + 'quanyi-icon.png'"></image>
		</view>
		<view v-if="isShowRule" class="rule-content-box">
			<image @click="isShowRule = false" class="rule-img" mode="widthFix" :src="imagePath + 'rule.png'"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name: "xmly-right-fix",
		data() {
			return {
				isShowRule: false,
			};
		},
		props: ['imagePath'],
		methods: {
			telMobile() {
				uni.makePhoneCall({
					phoneNumber: '4008825010'
				})
			},
			gotoQuanyi() {
				uni.navigateTo({
					url: '/pages/xmljj/xmljj'
				})
			}
		}
	}
</script>

<style lang="scss">
	.rule-box {
		position: fixed;
		top: 200rpx;
		right: 0;

		.rule-img {
			width: 40rpx;
			height: auto;
			margin-bottom: 20rpx;
			display: block;
		}
	}


	.rule-content-box {
		position: fixed;
		width: 100%;
		height: 100vh;
		left: 0;
		top: 0;
		overflow: auto;
		z-index: 9;

		.rule-img {
			width: 100%;
			height: auto;
		}
	}
</style>